package proxy.dynamic;

public class BusinessServiceImpl implements BusinessService {

    private static String staticName;

    private String name;

    public void interfaceMethod1() {
        System.out.println("interfaceMethod1 invoke...");
        interfaceMethod2();

        // ((BusinessService) AopContext.currentProxy()).interfaceMethod2()
        // 使用ThreadLocal存储当前的代理对象，调用代理对象的方法
    }

    @Override
    public void interfaceMethod2() {
        System.out.println("interfaceMethod2 invoke...");
    }

    @Override
    final public void interfaceMethod3() {
        System.out.println("final interfaceMethod3 invoke...");
    }

    private void privateMethod1() {
        System.out.println("privateMethod1 invoke...");
    }

    protected void protectedMethod1() {
        System.out.println("protectedMethod1 invoke...");
    }

}
